// 员工模块
import Layout from '@/layout'

/**
 * 第一层path 就是哪个模块
 * 这里的模块是员工 path: /employees
 * 员工模块下可能有很多子页面 配置在children字段 path不应该带/ 直接拼接
 *  员工列表 path: ''  => /employees
 *  员工详情页 path: 'detail/:id' => /employees/detail/:id
 *  员工A页面 path: 'a' => /employees/a
 *  员工B页面 path: 'b' => /employees/b
 */
export default {
  path: '/employees',
  component: Layout,
  children: [
    {
      path: '',
      name: 'employees',
      component: () => import('@/views/employees'),
      meta: { title: '员工', icon: 'people' }
    },
    {
      path: 'detail/:id', // 动态路由参数
      component: () => import('@/views/employees/detail'),
      hidden: true,
      meta: {
        title: '员工详情'
      }
    },
    // 员工打印页
    {
      path: 'print/:id',
      component: () => import('@/views/employees/print'),
      hidden: true,
      meta: {
        title: '员工打印'
      }
    }
  ]
}
